args <- commandArgs(trailingOnly=TRUE)

suppressPackageStartupMessages(require("scater"))
suppressPackageStartupMessages(require("methods"))

sce <- readRDS(args[1])

print(args)
write.table(assays(sce)[["counts"]], row.names=TRUE, col.names=TRUE, file=args[2], sep=",")
